package com.tinysand.advert.support;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * 推广计划数据获取请求对象
 *
 * Created By TINY
 * Create Time 2020/2/21
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AdPlanGetRequest {

    /* 获取推广计划的用户id */
    private Long userId;

    /* 要获取的所有推广计划的id */
    private List<Long> ids;

    public boolean validate() {
        return userId != null && !CollectionUtils.isEmpty(ids);
    }
}
